package com.gxc.mq;

import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitHandler;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * @author GongXincheng
 * @since 2019-08-23 09:10
 */
@Slf4j
@Component
@RabbitListener(queues = "demo2")
public class Demo2_Consumer_2 {

    @RabbitHandler
    public void process(String message) {
        log.info("[Consumer_2] receive massage: " + message);
        System.out.println("[Consumer_2] get message: " + message);
    }

}
